#ifndef CamerA_H
#define CamerA_H

#include "Vertex.h"
#include "Entity.h"
#include "Math.h"

namespace Y{

class Camera: public Entity{
	
	public:
		
		Vertex3d translations;
		Vertex3d rotations;
		Vertex3d scalings;
		
		bool smoothCamera;
		bool adjustedXY;
		bool reverseY;
		Vertex3d dTranslations;
		Vertex3d dRotations;
		Vertex3d dScalings;
		
		Vertex3b dActive[3];
		
		bool updating;
		int rotationModifierFlag;
	
	public:
	
		double mod;
		double translationMod;
		double rotationMod;
		double scalingMod;
		double smoothMod;
	
	public:
		
		Camera ();
		
		virtual void handleConfig ( ConfigVector& cv );
		
		virtual bool keyPress (unsigned char c, int mod);
		virtual bool keyRelease (unsigned char c, int mod);
		
		bool smooth () { return smoothCamera; }
		void smooth (bool b){ smoothCamera = b; }
		
		void smoothness (double s){ smoothMod = s; }
		double smoothness () const{ return smoothMod; }
		
		void start (){ updating = true; }
		void stop (){ updating = false; }
		
		virtual void timer (float);
		
		virtual void apply ();
};

}
#endif